#ifndef MIR_H_
#define MIR_H_

#include "recbase.h"
#include "rectype.h"
#include "stdffield.h"

namespace opsrc {
    namespace stdf {

        class Mir : public RecBase
        {
        public:

            Mir(stdf_rec stdfrec,  int reclen, std::ios::pos_type fileRecFirstBytePosition, int orderindex, endian e, char* buf );
            virtual ~Mir();

            const StdfField<long> getSetupTime() const;
            void setSetupTime(StdfField<long> ti);

            const StdfField<long> getStartTime() const;
            void setStartTime(StdfField<long>) ;

            const StdfField<int> getStartNum() const;
            void setStartNum(StdfField<int> startnum);

            const StdfField<string> getModeCode() const;
            void setModeCode(StdfField<string> mc);

            const StdfField<string> getRetestCode() const;
            void setRetestCode(StdfField<string> retestcode);

            const StdfField<string> getProductCode() const;
            void setProductCode(StdfField<string> pc);

            const StdfField<long> getBurnTime() const;
            void setBurnTime(StdfField<long> longt);

            const StdfField<string> getCmodCode() const;
            void setCmodCode(StdfField<string> cmodc);

            const StdfField<string> getLotId() const;
            void setLotId(StdfField<string> lotid);

            const StdfField<string> getPartType() const;
            void setPartType(StdfField<string> parttype);

            const StdfField<string> getNodeName() const;
            void setNodeName(StdfField<string> nodename);

            const StdfField<string> getTesterType() const;
            void setTesterType(StdfField<string> testertype);

            const StdfField<string> getJobName() const;
            void setJobName(StdfField<string> jobNm);

            const StdfField<string> getJobRevision() const;
            void setJobRevision(StdfField<string> jobrevision);

            const StdfField<string> getSubLotId() const;
            void setSubLotId(StdfField<string> slotlid);

            const StdfField<string> getOperatorName() const;
            void setOperatorName(StdfField<string> opName);

            const StdfField<string> getExecutionType() const;
            void setExecutionType(StdfField<string> execType);

            const StdfField<string> getExecutiveVersion() const;
            void setExecutiveVersion(StdfField<string> execVersion);

            const StdfField<string> getTestCode() const;
            void setTestCode(StdfField<string> testcode);

            const StdfField<string> getTestTemperature() const;
            void setTestTemperature(StdfField<string> testTemp);

            const StdfField<string> getUserText() const;
            void setUserText(StdfField<string> userText);

            const StdfField<string> getAuxilaryFile() const;
            void setAuxilaryFile(StdfField<string> auxfile);

            const StdfField<string> getPackageType() const;
            void setPackageType(StdfField<string> packageType);

            const StdfField<string> getFamilyId() const;
            void setFamilyId(StdfField<string> familyId);

            const StdfField<string> getDateCode() const;
            void setDateCode(StdfField<string> dateCode);

            const StdfField<string> getTestFacilityId() const;
            void setTestFacilityId(StdfField<string> facilityId);

            const StdfField<string> getTestFloorId() const;
            void setTestFloorId(StdfField<string> floorId);

            const StdfField<string> getProcessId() const;
            void setProcessId(StdfField<string> procid);

            const StdfField<string> getOperationFrequency() const;
            void setOperationFrequency(StdfField<string> opFreq);

            const StdfField<string> getSpecName() const;
            void setSpecName(StdfField<string> specNm);

            const StdfField<string> getSpecVersion() const;
            void setSpecVersion(StdfField<string> specVer);

            const StdfField<string> getFlowId() const;
            void setFlowId(StdfField<string> flowid);

            const StdfField<string> getSetupId() const;
            void setSetupId(StdfField<string> setupid);

            const StdfField<string> getDesignId() const;
            void setDesignId(StdfField<string> designid);

            const StdfField<string> getEngrgId() const;
            void setEngrgId(StdfField<string> engrgid);

            const StdfField<string> getRomCode() const;
            void setRomCode(StdfField<string> romcode);

            const StdfField<string> getSerialNumber() const;
            void setSerialNumber(StdfField<string> serialnum);

            const StdfField<string> getSupervisorName() const;
            void setSupervisorName(StdfField<string> suprnm);

            void readFields(char* buf);

        protected:
            Mir();

        private:
            // data variables
            StdfField<long> setupt;
            StdfField<long> startt;
            StdfField<int> stat_num;
            StdfField<string> mod_cod;
            StdfField<string> rtst_cod;
            StdfField<string> prot_cod;
            StdfField<long> burn_tim;
            StdfField<string> cmod_cod;
            StdfField<string> lot_id;
            StdfField<string> part_typ;
            StdfField<string> node_nam;
            StdfField<string> tstr_typ;
            StdfField<string> job_nam;
            StdfField<string> job_rev;
            StdfField<string> sblot_lid;
            StdfField<string> oper_nam;
            StdfField<string> exec_typ;
            StdfField<string> exec_ver;
            StdfField<string> test_cod;
            StdfField<string> tst_temp;
            StdfField<string> user_txt;
            StdfField<string> aux_file;
            StdfField<string> pkg_typ;
            StdfField<string> family_id;
            StdfField<string> date_cod;
            StdfField<string> facil_id;
            StdfField<string> floor_id;
            StdfField<string> proc_id;
            StdfField<string> oper_frq;
            StdfField<string> spec_nam;
            StdfField<string> spec_ver;
            StdfField<string> flow_id;
            StdfField<string> setup_id;
            StdfField<string> design_id;
            StdfField<string> engrg_id;
            StdfField<string> rom_cod;
            StdfField<string> serial_num;
            StdfField<string> supr_nam;

            endian en;
            bool decodeFields;


        };

    } // namespace stdf
}	// namespace opsrc

#endif /*MIR_H_*/
